Ternary 三元運算子


Posted by Rich on 2021-04-22

console.log(10 > 5 ? 'bigger' : 'smaller')
output:bigger

condition ? true : false
條件 ? true就執行 : false就執行


#note







Related Posts

畫frequency response和phase response(MATLAB))

畫frequency response和phase response(MATLAB))

[Note] Node.js + express + EJS

[Note] Node.js + express + EJS

2. 架構完整的 React 專案結構

2. 架構完整的 React 專案結構


Comments